//
//  ChannelTableViewCell.m
//  项目
//
//  Created by 杨世博 on 15-1-4.
//  Copyright (c) 2015年 张诗雨. All rights reserved.
//

#import "ChannelTableViewCell.h"
#import "WebColor.h"
@implementation ChannelTableViewCell
- (void)dealloc
{
    [_backgroundImage release];
    [_dateLabel release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.backgroundImage = [[UIImageView alloc] init];
        [self.contentView addSubview:_backgroundImage];
        [_backgroundImage release];
        
        self.shadowImage = [[UIImageView alloc] init];
        [self.backgroundImage addSubview:_shadowImage];
        [_shadowImage release];
        
        self.dateLabel = [[UILabel alloc] init];
        [_dateLabel setTextColor:[WebColor white]];
        [self.backgroundImage addSubview:_dateLabel];
        [_dateLabel release];
     
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    [self.backgroundImage setFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
    [self.shadowImage setFrame:CGRectMake(0, 0, self.frame.size.width / 5 * 2, self.frame.size.height)];
    [self.dateLabel setFrame:CGRectMake(self.frame.size.width - 50, 20, 50, 30)];
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
